<?php
   
class Global_Resource_Persistence extends Zend_Application_Resource_ResourceAbstract
{
    private $_store;

    public function init()
    {   
        return $this->getStore();
    }
        
    public function getStore()
    {
        $options = $this->getOptions();
        $db = Zend_Db_Table::getDefaultAdapter();
        $this->_store = new Application_Service_Persistence_Store($db, $options["configuration"]);

        Zend_Registry::set('store', $this->_store);

        return $this->_store;
    }
}

